<template>
	<van-popup :show="showCouponTips" position="center" @click-overlay="showCouponTips=false" round
		@touchmove.stop.prevent="moveStop">
		<view class="coupon-tips">
			<view class="tips-title">
				券信息
			</view>
			<view class="use-screen">
				可兑换影厅：
			</view>
			<view>
				<text
					style="font-weight: bold;color: #FF655B;text-align: justify;text-indent: 52rpx;">{{getScreenName()}}</text>
			</view>
		</view>
	</van-popup>
</template>

<script>
	export default {
		props: ['showCouponTips', 'hallCode'],
		data() {
			return {

			}
		},
		computed: {
			getScreenName() {
				return () => {
					const {
						screens
					} = this.$store.state
					if (this.hallCode) {
						const list = this.hallCode.split(',')
						const strArr = []
						// const index = screens.find(item => item.ScreenCode === code)
						list.map(item => {
							screens.map(screen => {
								if (screen.ScreenCode == item) strArr.push(screen.ScreenName)
							})
						})
						return strArr.join('、')
					} else {
						return ''
					}



				}
			},
		}
	}
</script>

<style lang="scss">
	.coupon-tips {
		padding: 40rpx 20rpx;
		font-size: 24rpx;
		width: 70vw;
		// border-radius: ;

		.tips-title {
			text-align: center;
			font-size: 30rpx;
		}

		.use-screen {
			font-size: 26rpx;
			margin-top: 20rpx;
			text-align: justify;
		}
	}
</style>